<template>
	<div>
		<el-card class="!border-none pt-4" shadow="never">
			<el-form class="ls-form el-set-form" :model="formData" inline>
				<el-form-item label="客户ID">
					<el-input placeholder="请输入" v-model="formData.Number" clearable />
				</el-form-item>
				<el-form-item label="客户公司">
					<el-input placeholder="请输入" v-model="formData.Number" clearable />
				</el-form-item>
				<el-form-item label="联系人">
					<el-input placeholder="请输入" v-model="formData.Number" clearable />
				</el-form-item>
				<el-form-item label="联系方式">
					<el-input placeholder="请输入" v-model="formData.Number" clearable />
				</el-form-item>
				<el-form-item label="邮箱">
					<el-input placeholder="请输入" v-model="formData.Number" clearable />
				</el-form-item>
				<el-form-item label="感兴趣产品">
					<el-input placeholder="请输入" v-model="formData.Number" clearable />
				</el-form-item>
				<el-form-item label="国家">
					<el-input placeholder="请输入" v-model="formData.Number" clearable />
				</el-form-item>
				<el-form-item label="市场">
					<el-input placeholder="请输入" v-model="formData.Number" clearable />
				</el-form-item>
				<el-form-item label="客户分类">
					<el-select multiple placeholder="请选择" class="flex-1 ml-[10px]">
						<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
						</el-option>
					</el-select>
				</el-form-item>
				<el-form-item label="客户类型">
					<el-select multiple placeholder="请选择" class="flex-1 ml-[10px]">
						<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
						</el-option>
					</el-select>
				</el-form-item>
				<el-form-item label="所属销售">
					<el-select multiple placeholder="请选择" class="flex-1 ml-[10px]">
						<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
						</el-option>
					</el-select>
				</el-form-item>
				<el-form-item>
					<el-button class="main-color1 w-[76px]">重置</el-button>
					<el-button class="w-[76px]" type="primary" color="#0054A6">查询</el-button>
				</el-form-item>
			</el-form>
		</el-card>
		<el-card class="!border-none mt-4" shadow="never">
			<div class="v-flex v-row-right">
				<el-button class="w-[90px] h-[36px]" color="#0054A6" type="primary">
					<router-link :to="{
					        path: getRoutePath('CustomerManagement.CustomerManagement/CustomerManagementAdd'),
					        query: {
					            id: '1'
					        }
					    }">
						<span>添加</span>
					</router-link>
				</el-button>
				<el-button class="w-[90px] h-[36px]" color="#0054A6" type="primary">
					<span>导入</span>
				</el-button>
				<el-button class="w-[90px] h-[36px]" color="#0054A6" type="primary">
					<span>导出</span>
				</el-button>
			</div>
			<el-tabs v-model="tabsActive" @tab-change="getLists">
				<el-tab-pane v-for="(item, index) in tabsMap" :key="index" :label="item.name" :name="item.type"
					lazy></el-tab-pane>
			</el-tabs>
			<el-table class="mt-[20px]" size="large" :data="lists"
				:header-cell-style="{'background':'#0054A6','color':'#fff','line-height':'52px','padding':'14px 0'}"
				:cell-style="{'color':'#0054A6','padding':'20px 0'}">
				<el-table-column label="客户ID" prop="name" align="center" />
				<el-table-column label="客户公司名称" prop="询价单" align="center" />
				<el-table-column label="联系人" prop="询价单" align="center" />
				<el-table-column label="联系方式" prop="询价单" align="center" />
				<el-table-column label="市场" prop="询价单" align="center" />
				<el-table-column label="客户类型" prop="询价单" align="center" />
				<el-table-column label="邮箱" prop="询价单" align="center" />
				<el-table-column label="创建时间" prop="询价单" align="center" />
				<el-table-column label="所属销售" prop="询价单" align="center" />
				<el-table-column label="来源" prop="询价单" align="center" />
				<el-table-column label="操作" fixed="right" align="center">
					<template #default="{ row }">
						<el-button type="primary" link>
							<span class="main-color1">编辑</span>
						</el-button>
						<el-button type="primary" link>
							<span class="main-color1">下单记录</span>
						</el-button>
						<el-button type="primary" link>
							<router-link :to="{
							        path: getRoutePath('CustomerManagement.CustomerManagement/ShippingRecord'),
							        query: {
							            id: '1'
							        }
							    }">
								<span class="main-color1">出货记录</span>
							</router-link>
						</el-button>
						<el-button type="primary" link>
							<span class="main-color1">重置密码</span>
						</el-button>
						<el-button type="primary" link>
							<router-link :to="{
							        path: getRoutePath('CustomerManagement.CustomerManagement/BrowsingHistory'),
							        query: {
							            id: '1'
							        }
							    }">
								<span class="main-color1">浏览记录</span>
							</router-link>
						</el-button>
					</template>
				</el-table-column>
			</el-table>
			<div class="p-[20px] v-flex v-row-right">
				<el-pagination color="#0054A6" background layout="prev, pager, next" :default-page-size="6"
					:total="1000" :pager-count="6" />
			</div>
		</el-card>
	</div>
</template>

<script lang="ts" setup>
	import { getRoutePath } from '@/router'
	const formData = reactive({
		Number: '',
		type: '',
	})
	const options = ref<Array<any>>([
		{
			value: '1',
			label: 'Metos/Sandvik/Extec/Symons'
		},
	])
	enum NoticeEnums {
		All = 1,
		PLATFORM = 2,
		HasRead = 3
	}
	const tabsActive = ref(NoticeEnums.All)
	const tabsMap = [
		{
			name: '全部',
			type: 1
		},
		{
			name: '待审核',
			type: 2
		},
		{
			name: '已通过',
			type: 3
		},
		{
			name: '未通过',
			type: 4
		},
	]
	const getLists = (fullPath : any) => {

	}
	const lists = ref<Array<any>>([
		{}, {}, {}
	])
</script>

<style lang="scss" scoped>
	.el-set-form:deep() .el-form-item__label {
		color: var(--el-text-color-main);
		height: 36px;
		line-height: 36px;
	}

	.el-set-form:deep() .el-input__inner {
		height: 36px;
	}

	.el-set-form:deep() .el-input__inner::placeholder {
		color: var(--el-text-color-main);
	}
	:deep() .el-dialog__title {
		color: var(--el-text-color-main);
	}

	:deep() .el-pagination.is-background .el-pager li.is-active {
		background-color: var(--el-text-color-main);
	}
</style>